package client

import (
	"cloud-entropy-storage-system/common/pb/pbfiles"
	"context"
	"google.golang.org/grpc"
)

type UploadClient struct {
	client pbfiles.UploadRpcClient
}

func NewUploadClient(conn grpc.ClientConnInterface) *UploadClient {
	client := pbfiles.NewUploadRpcClient(conn)
	return &UploadClient{client: client}
}

func (u *UploadClient) Upload(req *pbfiles.UploadRequest) (*pbfiles.UploadResponse, error) {
	return u.client.Upload(context.Background(), req)
}
